<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path=request.getScheme()+"://"+request.getServerName()+":"+
	request.getServerPort()+request.getContextPath()+"/";
	pageContext.setAttribute("path", path);
%>
<!DOCTYPE html>
<html>
<head>
	<base href="<%=this.getServletContext().getContextPath() %>/order/">
    <title>订单</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="../Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="../Css/style.css" />
    <script type="text/javascript" src="../Js/jquery.js"></script>
    <script type="text/javascript" src="../Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="../Js/bootstrap.js"></script>
    <script type="text/javascript" src="../Js/ckform.js"></script>
    <script type="text/javascript" src="../Js/common.js"></script>
    <script type="text/javascript" src="../Js/jquery-3.4.1.js"></script>

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
    <script type="text/javascript">
    
    </script>
</head>
<body>

<table class="table table-bordered table-hover definewidth m10" >
   <thead>
    <tr>
    	<th><input type="checkbox" id="checkall" onChange="checkall();"></th>
        <th>订单编号</th>
        <th>药品编号</th>
        <th>药品名称</th>
        <th>购买数量</th>
        <th>支付价格</th>
        <th>顾客编号</th>
        <th>顾客姓名</th>
        <th>交易时间</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    	 <c:forEach items="${order}" var="order">
    	  <tr><td><input type="checkbox"/></td>
    	    <td>${order.oid}</td>
    	    <td>${order.did}</td>
    	    <td>${order.dname }</td>
    	    <td>${order.oquantity }</td>
    	    <td>${order.oprice }</td>
    	    <td>${order.cid }</td>
    	    <td>${order.cname}</td>
    	    <td>${order.odate }</td>
    	    <td>
    	     <a href="${path}orderServlet.do?method=deleteOrderByOid&oid=${order.oid }">删除</a>
    	    </td>
    	  </tr>
    	 </c:forEach>
	 </tbody>
  </table>
  <table class="table table-bordered table-hover definewidth m10" >
  	<tr>
  		<th colspan="5">  <div class="inline pull-right page">
          <a href='${path}orderServlet.do?method=showOrderByPage&current_page=1' >首页</a> 
          
          <a href='${path}orderServlet.do?method=showOrderByPage&current_page=${pt.pre_page}'>上一页</a>
          
          <a href='${path}orderServlet.do?method=showOrderByPage&current_page=${pt.next_page}'>下一页</a> 
          
          <a href='${path}orderServlet.do?method=showOrderByPage&current_page=${pt.count_page}'>尾页</a>
          
		  &nbsp;&nbsp;&nbsp;共<span class='current'> ${pt.count_rows} </span>条记录
		  <span class='current'> ${pt.current_page} </span>页
		  
		  </div>
		 <div>
		 <button type="button" class="btn btn-success" id="delAll">批量删除</button>
		 </div>
		 
		 </th>
	</tr>
  </table>  
  
  <script>
  
  </script>
</body>
</html>
